package com.miplus.ccrm.core.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.miplus.ccrm.core.controller.vo.credit.DistCountVo;
import com.miplus.ccrm.core.controller.vo.credit.DistCreditcaseVo;
import com.miplus.ccrm.core.mapper.model.FiCasesSmsBatchVo;
import com.miplus.ccrm.core.mapper.model.FiCasesSmsVo;
import com.miplus.ccrm.core.pojo.FiCreditcases;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.cursor.Cursor;
import org.apache.poi.hpsf.Decimal;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
* @author pc
* @description 针对表【fi_creditcases(案件表)】的数据库操作Mapper
* @createDate 2024-03-26 21:59:40
* @Entity com.miplus.ccrm.core.pojo.FiCreditcases
*/
@Mapper
public interface FiCreditcasesMapper extends MPJBaseMapper<FiCreditcases> {

    int updateToHist(String batchid, String distdtime);

    int updateToHistByAss(String batchid);

    int updateToHistByID(Integer actionType, Integer ficaseid);

    int updateHistDistStatus(String batchid);

    //BigDecimal getPayAmt(String acctno, String distdt, String recydt);

    int insertRecycleHist(String recycledt,String usrid,String recybatchid,String recyremark);
    int updateRecycleInit(String recycledt,String usrid,String recybatchid);

    List<FiCreditcases> getDistributeCollectList(@Param("conditionSql") String conditionSql);

    List<FiCreditcases> getAssignCollectlist(@Param("conditionSql") String conditionSql, @Param("grpId") String grpId);


    FiCasesSmsVo getCasesSmsInfo(Long creditcaseid);//获取短信发送参数

    @Select("SELECT employeeid FROM sys_user WHERE usrId=#{usrId}")
    String getEmployeeid(@Param("usrId") String usrId);

    @Select("SELECT fun_getnames('COLLECT.QUEUE',#{st})")
    String getCccDesc(@Param("st") String st);

    DistCountVo getDistTotalCount(String conditionSql);

    /**
     *
     * @param conditionSql
     * @param isDesc 1:安装逾期金额倒序排序， 0：正序
     * @return
     */
    Cursor<DistCreditcaseVo> getDistCursorList(String conditionSql,Integer isDesc);

    List<DistCreditcaseVo> getDistObjectList( @Param("conditionSql") String conditionSql,
                                             @Param("amountMode") Integer amountMode);

    List<FiCasesSmsBatchVo> getPhoneList(@Param("list") List<Integer> list);
}




